<template>
  <div class="home">
    <!-- 路由出口 -->
    <router-view></router-view>
    <!-- 下边栏 -->
    <!-- <router-link to="/home/company">公司</router-link>
    <router-link to="/home/question">刷题</router-link>
    <router-link to="/home/find">发现</router-link>
    <router-link to="/home/my">我的</router-link> -->
    <van-tabbar
      v-if="$route.meta.needTab"
      route
      placeholder
      active-color="#e40137"
      inactive-color="#b4b4bd"
      class="tabbar"
    >
      <van-tabbar-item to="/home/company">
        <span>公司</span>
        <template #icon>
          <i class="iconfont">&#xe63d;</i>
        </template>
      </van-tabbar-item>
      <van-tabbar-item to="/home/question">
        <span>刷题</span>
        <template #icon>
          <i class="iconfont">&#xe642;</i>
        </template>
      </van-tabbar-item>
      <van-tabbar-item to="/home/find">
        <span>发现</span>
        <template #icon>
          <i class="iconfont">&#xe646;</i>
        </template>
      </van-tabbar-item>
      <van-tabbar-item to="/home/my">
        <span>我的</span>
        <template #icon>
          <i class="iconfont">&#xe645;</i>
        </template>
      </van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data () {
    return {
      active: 3
    }
  }
}
</script>

<style lang="less">
.home {
  .tabbar {
    height: 60px;
    .iconfont {
      font-size: 28px;
    }
  }
}
</style>
